package com.hom;

import java.util.function.Consumer;

public class Test2 {
    public static void main(String[] args) {
        //本类用于测试消费型接口
        Consumer<String> t1 = new Consumer<String>() {
            @Override
            public void accept(String s) {
                System.out.println(s);
            }
        };
        t1.accept("d地方");

    }
}
